#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;

int main()
{

	int N = 0;
	int M = 0;
	scanf("%d %d", &N, &M);

	int tem = 1;
	int sum = 0;
	int num = N + M;
	for (int i = 1; i <= num; i++)
	{
		tem *= i;
		sum += tem;
	}

	printf("sum:%d! =  %d\n", num, sum);
	printf("num:%d! =  %d\n", num, tem);

	return 0;
}
